﻿@model LetLord.Models.Tenant
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Edit property attributes</h3>
</div>
@using (Ajax.BeginForm("EditTenantPropertyAttributes", "Tenants", FormMethod.Post,
                        new AjaxOptions
                        {
                            InsertionMode = InsertionMode.Replace,
                            HttpMethod = "POST",
                            UpdateTargetId = "tenant-property-attributes"
                        }))
{
    @Html.ValidationSummary(true)
    @Html.AntiForgeryToken()
    @Html.HiddenFor(x => x.UserName)
    @Html.HiddenFor(x => x.FirstName)
    @Html.HiddenFor(x => x.LastName)
    @Html.HiddenFor(x => x.TenantAge)
    @Html.HiddenFor(x => x.Email)
    @Html.HiddenFor(x => x.PersonalDescription)
    <div class="modal-body">
        <div class="span6">
            @Html.Bootstrap().ControlGroup().DropDownListFor(x => x.DesiredPropertyLocation, new SelectList(LetLord.ViewModels.BasicPropertySearchViewModel.Counties))
            @Html.Bootstrap().ControlGroup().DropDownListFor(x => x.DesiredPropertyTypeString, new SelectList(Enum.GetValues(typeof(LetLord.ViewModels.PropertyType))))
            @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.MinBudget)
            @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.MaxBudget)
            @Html.Bootstrap().ControlGroup().TextBoxFor(x => x.DesiredNumberOfBedroomsString)
        </div>
        <div class="span6">
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.IsProfessional)
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.IsStudent)
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.HasChildren)
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.HasRentAllowance)
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.IsInGroup)
            @Html.Bootstrap().ControlGroup().CheckBoxFor(x => x.HasPets)
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-inverse" id="btn-save-edit-tenant-attributes" type="submit">Save</button>
    </div>
}


